import 'package:mtf/app/data/BankEntity.dart';
import 'package:mtf/app/data/BannerEntity.dart';
import 'package:mtf/app/data/FileEntity.dart';
import 'package:mtf/app/data/IncomeEntity.dart';
import 'package:mtf/app/data/KInfoEntity.dart';
import 'package:mtf/app/data/NewsEntity.dart';
import 'package:mtf/app/data/NoticeEntity.dart';
import 'package:mtf/app/data/RechargeConfigEntity.dart';
import 'package:mtf/app/data/RechargeRecordEntity.dart';
import 'package:mtf/app/data/TokenBeanEntityEntity.dart';
import 'package:mtf/app/data/UsdRecordEntity.dart';
import 'package:mtf/app/data/VideoEntity.dart';
import 'package:mtf/app/data/WithdrawRecordEntity.dart';
import 'package:mtf/app/data/user_info_entity.dart';

import '../data/AgreementContainEntity.dart';
import '../data/ClassifyBeanEntity.dart';
import '../data/ClassifyEvaluateBeanEntity.dart';
import '../data/MoneyAccountCountEntity.dart';
import '../data/QuestionEntity.dart';
import '../data/ServerEntity.dart';
import '../data/VersionBeanEntity.dart';

class EntityFactory {
  static T? generateOBJ<T>(json) {
    switch (T.toString()) {
      case "TokenBeanEntityEntity":
        return TokenBeanEntityEntity.fromJson(json) as T;
      case "UserInfoEntity":
        return UserInfoEntity.fromJson(json) as T;
      case "BannerEntity":
        return BannerEntity.fromJson(json) as T;
      case "NoticeEntity":
        return NoticeEntity.fromJson(json) as T;
      case "VideoEntity":
        return VideoEntity.fromJson(json) as T;
      case "NewsEntity":
        return NewsEntity.fromJson(json) as T;
      case "FileEntity":
        return FileEntity.fromJson(json) as T;
      case "BankEntity":
        return BankEntity.fromJson(json) as T;
      case "RechargeRecordEntity":
        return RechargeRecordEntity.fromJson(json) as T;
      case "RechargeConfigEntity":
        return RechargeConfigEntity.fromJson(json) as T;
      case "WithdrawRecordEntity":
        return WithdrawRecordEntity.fromJson(json) as T;
      case "UsdRecordEntity":
        return UsdRecordEntity.fromJson(json) as T;
      case "IncomeEntity":
        return IncomeEntity.fromJson(json) as T;
      case "KInfoEntity":
        return KInfoEntity.fromJson(json) as T;
      case "VersionBeanEntity":
        return VersionBeanEntity.fromJson(json) as T;
      case "AgreementContainEntity":
        return AgreementContainEntity.fromJson(json) as T;
      case "ClassifyBeanEntity":
        return ClassifyBeanEntity.fromJson(json) as T;
      case "ClassifyEvaluateBeanEntity":
        return ClassifyEvaluateBeanEntity.fromJson(json) as T;
      case "QuestionEntity":
        return QuestionEntity.fromJson(json) as T;
      case "ServerEntity":
        return ServerEntity.fromJson(json) as T;
      case "MoneyAccountCountEntity":
        return MoneyAccountCountEntity.fromJson(json) as T;
      default:
        return json;
    }
  }
}
